/* set */
#include <iostream>
#include <set>


using namespace std;


int showData(set<int> &s)
{   
    set<int>::const_iterator it = s.begin();

    for (; it != s.end(); it++)
    {
        cout << *it << " ";
    } /* end of for (; it != s.end(); it++) */

    cout << endl;


    return 0;
}

int main(int argc, char **argv)
{
    set<int> s;
    set<int>::const_iterator it;

    s.insert(10);
    s.insert(50);
    s.insert(30);
    s.insert(20);
    s.insert(40);

    showData(s);


    cout << s.empty() << endl;

    cout << s.size() << endl;

    it = s.find(40);

    if (it == s.end())
    {
        cout << "没有找到" << endl;
    } /* end of if (it == s.end()) */
    else 
    {
        cout << *it << endl;
    }   /* end of else */


    return 0;
}